using System.Collections;
using System.Collections.Generic;

namespace MyAnt
{
	public static class EnumeratorExtensions
	{
		public static IEnumerable<T> ToEnumerable<T>(this IEnumerator enumerator)
		{
			while (enumerator.MoveNext()) yield return (T)enumerator.Current;
		}
	}
}